﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CostCenterToPIPPath.aspx.cs" Inherits="Hisun.View.CostCenterPath.CostCenterToPIPPath" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
           <div class =" CommonPage_MainPanel">
    <div class ="CommonPage_Banner"><div class = "CommomPage_Title">直接费用分配设置</div></div>
    <div class ="CommonPage_Body">
        <table style="width: 100%;">
            <tr>
                <td>
                      <asp:Label ID="Label3" runat="server" Text="过滤条件：" SkinID="Label"></asp:Label>
                    <asp:TextBox ID="TextBox_FilterText" runat="server" SkinID="TextBox"></asp:TextBox>
                    <asp:Button SkinID = "Button" ID="Button_fullCenterList" runat="server" 
                        onclick="Button_fullCenterList_Click" Text="刷新" />
                </td>
            </tr>
            <tr>
                <td>
                     <asp:Label ID="Label1" runat="server" Text="作业中心：" SkinID="Label"></asp:Label>
                    <asp:DropDownList ID="dropCostCenterSelect" runat="server" Height="31px" 
                        Width="218px" SkinID="DropdownList">
                    </asp:DropDownList>
                      <asp:Button SkinID = "Button" ID="Button_Query" runat="server" OnClick="Button_Query_Click" Text="查询" />
                                    <asp:Label ID="Label34" runat="server" Text="修改动因量填充方式："></asp:Label>
                                    <asp:DropDownList ID="DropDownList_DriverFullOption" 
                         runat="server">
                                        <asp:ListItem Value="0">无</asp:ListItem>
                                        <asp:ListItem Value="1">原材料金额</asp:ListItem>
                                        <asp:ListItem Value="2">人工费</asp:ListItem>
                                    </asp:DropDownList>
                                <asp:Button SkinID = "Button" ID="Button1" runat="server" onclick="Button1_Click" 
                         Text="确定" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Panel ID="Panel_PIPList" runat="server">
                     <asp:Label ID="Label_FullDriver" runat="server" Text="动因量自动填充方式：" SkinID="Label" 
                            ForeColor="Blue"></asp:Label>
                      <asp:GridView ID="GridView_PIPList" runat="server" SkinID="GridView"  
                            AutoGenerateColumns="False" OnRowEditing="GridView_PIPList_OnRowCommand" OnRowCancelingEdit="GridView_PIPList_OnRowCancel"
                        OnRowUpdating="GridView_PIPList_OnRowUpdate">
                        <Columns>
                            
                                     <asp:TemplateField HeaderText="作业中心ID">

                                <ItemTemplate>
                                    <asp:Label ID="Label33" runat="server" Text='<%# Eval("作业中心ID") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                       
                            <asp:TemplateField HeaderText="作业中心名称">

                                <ItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%# Eval("作业中心名称") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            
                              
                            <asp:TemplateField HeaderText="目标中间体ID">

                                <ItemTemplate>
                                    <asp:Label ID="Label4" runat="server" Text='<%# Eval("中间体ID") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            
                              
                            <asp:TemplateField HeaderText="目标中间体名称">

                                <ItemTemplate>
                                    <asp:Label ID="Label5" runat="server" Text='<%# Eval("中间体名称") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                                 <asp:TemplateField HeaderText="成本账户ID">
                 
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("成本账户ID") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            
                                 <asp:TemplateField HeaderText="成本账户名称">
                 
                                <ItemTemplate>
                                    <asp:Label ID="Label11" runat="server" Text='<%# Eval("成本账户名称") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="分配费率">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox_Index" runat="server" SkinID="TextBox" 
                                        Text='<%# Bind("系数") %>'></asp:TextBox>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                        ControlToValidate="TextBox_Index" ErrorMessage="RegularExpressionValidator" 
                                        ValidationExpression="^(([1-9]+\d*)|([1-9]+\d*\.\d{1,2}))$" 
                                        ValidationGroup="group">*</asp:RegularExpressionValidator>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label2" runat="server" Text='<%# Eval("系数") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <EditItemTemplate>
                                    <asp:Button SkinID = "Button" ID="Button_Save" runat="server" CommandArgument='<%# Eval("ID") %>' 
                                        CommandName="Update" Text="保存" />
                                    <asp:Button SkinID = "Button" ID="Button_Cancel" runat="server" CommandName="Cancel" Text="取消" />
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Button SkinID = "Button" ID="Button_Edit" runat="server" CommandName="Edit" Text="编辑" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                
                                <ItemTemplate>
                                    <asp:Button SkinID = "Button" ID="Button_Del" runat="server" CommandArgument='<%# Eval("ID") %>' 
                                        oncommand="Button_Del_Command" Text="删除"  onclientclick="return confirm('确定要删除当前行？');"/>
                                </ItemTemplate>
                            </asp:TemplateField>
                            
                              
                        </Columns>
                    </asp:GridView>
                    <asp:Button SkinID = "Button" ID="Button_Add" runat="server" Text="增加" 
                        onclick="Button_Add_Click" /> 
                    </asp:Panel> 
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Panel ID="Panel_Select" runat="server">
                        <table style="width:100%;">
                            <tr>
                                <td>
                                    <asp:Label ID="Label5" runat="server" SkinID="Label" Text="选择目标中间体："></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                   <asp:Label ID="Label2" runat="server" Text="产品ID：" SkinID="Label"></asp:Label>
                        <asp:TextBox ID="TextBox_ProductId"
                            runat="server" SkinID="TextBox"></asp:TextBox>
                            <asp:Label ID="Label4" runat="server" Text="作业中心名称：" SkinID="Label"></asp:Label>
                        <asp:TextBox ID="TextBox_CenterName"
                            runat="server" SkinID="TextBox"></asp:TextBox>
                            <asp:Button SkinID = "Button" ID="Button_SelectQuery" runat="server"
                                Text="查询" onclick="Button_SelectQuery_Click" /></td>
                            </tr>
                            <tr>
                                <td>
                                     
                       
                                      <asp:Panel ID="Panel_SelectGridList" runat="server">
                                      <asp:GridView ID="GridView_SelectPIP" runat="server" SkinID="GridView"  AutoGenerateColumns="False">
                        <Columns>
                           <asp:BoundField DataField="成本账户ID" HeaderText="成本账户ID" />
                            <asp:BoundField DataField="作业中心ID" HeaderText="作业中心ID" />
                              <asp:BoundField DataField="作业中心名称" HeaderText="作业中心名称" />
                            <asp:BoundField DataField="中间体ID" HeaderText="中间体ID" />
                            <asp:BoundField DataField="中间体名称" HeaderText="中间体名称" />
                            
                            
                              
                            <asp:TemplateField>
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="CheckBox_SelectPIP" runat="server" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            
                            
                              
                        </Columns>
                        </asp:GridView> <asp:Button SkinID = "Button" ID="Button_Save0" runat="server" Text="确定" 
                            onclick="Button_Save_Click" />  
                        <asp:Button SkinID = "Button" ID="Button_Cancel0" runat="server" Text="取消" 
                            onclick="Button_Cancel_Click" /></asp:Panel>
                        </td>
                            </tr>
                        </table>
                     
                        </asp:Panel>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:HiddenField ID="HiddenField_CurrentCenterId" runat="server" />
                    <asp:HiddenField ID="HiddenField_FullDriverValue" runat="server" /></td>
            </tr>
        </table>
    </div>
    </div>
    </form>
</body>
</html>
<% =alert%>
